package com.yangaobo.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author 杨奥博
 */
@ColumnWidth(20)
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT, verticalAlignment = VerticalAlignmentEnum.CENTER)
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT, verticalAlignment = VerticalAlignmentEnum.CENTER)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class EmpExcel implements Serializable {
    @ExcelProperty(value = {"员工数据统计表", "登录账号"})
    private String username;
    @ExcelProperty(value = {"员工数据统计表", "头像"})
    private String avatar;
    @ExcelProperty(value = {"员工数据统计表", "手机号"})
    private String phone;
    @ExcelProperty(value = {"员工数据统计表","微信号"})
    private String wechat;
    @ExcelProperty(value = {"员工数据统计表","邮箱"})
    private String email;
    @ExcelProperty(value = {"员工数据统计表","性别"})
    private String gender;
    @ExcelProperty(value = {"员工数据统计表","省份"})
    private String province;
    @ExcelProperty(value = {"员工数据统计表","居住地址"})
    private String address;
    @ExcelProperty(value = {"员工数据统计表", "真实姓名"})
    private String realname;
    @ExcelProperty(value = {"员工数据统计表", "身份证号"})
    private String idcard;
    @ExcelProperty(value = {"员工数据统计表", "部门名称"})
    private String deptTitle;
    @ColumnWidth(40)
    @ExcelProperty(value = {"员工数据统计表", "员工描述"})
    private String info;
    @ExcelProperty(value = {"员工数据统计表", "入职时间"})
    @DateTimeFormat("yyyy/MM/dd HH:mm:ss")
    private LocalDateTime hiredate;
    @ExcelProperty(value = {"员工数据统计表", "首次创建日期"})
    @DateTimeFormat("yyyy/MM/dd HH:mm:ss")
    private LocalDateTime created;
    @ExcelProperty(value = {"员工数据统计表", "最后创建日期"})
    @DateTimeFormat("yyyy/MM/dd HH:mm:ss")
    private LocalDateTime updated;
}